package GUILayer;

import java.awt.BorderLayout;

import javax.swing.JPanel;

import GUIHelper.RoomTypeInfoPanel2;
import GUIHelper.RoomTypeTablePanel;
import ModelLayer.RoomType;

public class RoomTypeModelGUI extends JPanel {

	private static final long serialVersionUID = 1L;
	private RoomTypeGUI rtGUI;
	private RoomType rt;
	private RoomTypeTablePanel rtLeftPanel;

	public RoomTypeModelGUI(RoomType rt, RoomTypeGUI rtGUI) {
		this.rtGUI = rtGUI;
		this.rt = rt;
		initialize();
	}

	public void initialize() {
		this.setLayout(new BorderLayout());
		JPanel rtPanel = new JPanel();
		RoomGUI roomPanel = new RoomGUI(this);
		this.add(rtPanel, BorderLayout.NORTH);
		this.add(roomPanel, BorderLayout.CENTER);

		rtLeftPanel = new RoomTypeTablePanel(this);
		RoomTypeInfoPanel2 rtRightPanel = new RoomTypeInfoPanel2(this);
		rtPanel.setLayout(new BorderLayout());
		rtPanel.add(rtLeftPanel, BorderLayout.CENTER);
		rtPanel.add(rtRightPanel, BorderLayout.EAST);

	}

	public RoomType getRt() {
		return rt;
	}

	public void setRt(RoomType rt) {
		this.rt = rt;
	}

	public RoomTypeGUI getRtGUI() {
		return rtGUI;
	}

	public void setRtGUI(RoomTypeGUI rtGUI) {
		this.rtGUI = rtGUI;
	}

	public RoomTypeTablePanel getRtLeftPanel() {
		return rtLeftPanel;
	}

	public void setRtLeftPanel(RoomTypeTablePanel rtLeftPanel) {
		this.rtLeftPanel = rtLeftPanel;
	}

}
